/* ----------------------------------------------------------------------------------------------------
*
*  Copyright 2002 e Professional Corporation.  All Rights Reserved.
*
*  File		:		PasswordTag.java
*
*  Author	:		x
*
*  Date		:		14/05/2002
*
*---------------------------------------------------------------------------------------------------- */

package com.epro.standard.frontend.tagext;

import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.TagSupport;

public class PasswordTag extends TagSupport {
    private String name = "";
    private String width = "";
    private String height = "";
    private String onclick = "";
    private String fixLength = "";
    private String maxLength = "";
    private String require = "";
    private String styleClass = "";
    private String styleS = "";
    private String value = "";

    public void setStyleClass(String styleClass) {
        this.styleClass = styleClass;
    }

    public void setStyleS(String styleS) {
        this.styleS = styleS;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setWidth(String width) {
        this.width = width;
    }

    public void setHeight(String height) {
        this.height = height;
    }

    public void setOnclick(String onclick) {
        this.onclick = onclick;
    }

    public void setFixLength(String fixLength) {
        this.fixLength = fixLength;
    }

    public void setMaxLength(String maxLength) {
        this.maxLength = maxLength;
    }

    public void setRequire(String require) {
        this.require = require;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public int doStartTag() throws javax.servlet.jsp.JspException {
        String str = "";
        try {
            str += "<epro:password ";
            if (!(name.equals("")))
                str += " name='" + name + "'";
            if (!width.equals(""))
                str += " width='" + width + "'";
            if (!(height.equals("")))
                str += " height='" + height + "'";
            if (!(fixLength.equals("")))
                str += " fixLength='" + fixLength + "'";
            if (!(maxLength.equals("")))
                str += " maxLength='" + maxLength + "'";
            if (!(require.equals("")))
                str += " require='" + require + "'";

            if (!(onclick.equals("")))
                str += " onclick=\"" + onclick + "\"";

            if (!(styleClass.equals("")))
                str += " styleClass=\"" + styleClass + "\"";
            if (!(styleS.equals("")))
                str += " styleS=\"" + styleS + "\"";

            if (!(value.equals("")))
                str += " value=\"" + value + "\"";

            str += "/>";

            JspWriter out = pageContext.getOut();
            out.println(str);

        } catch (java.io.IOException ioe) {
            ioe.printStackTrace();
        }

        return SKIP_BODY;
    }

}

